<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class editPassRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'oldpass' => 'required',
            'newpass' => 'required|min:6',
            'repeatpass' => 'required',
        ];
    }
    public function messages()
    {
        return [
           'oldpass.required' => '请输入旧密码',
           'newpass.required' => '请输入新密码',
           'repeatpass.required' => '请输入确认密码',
           'newpass.min' => '新密码长度至少6位',

        ];
    }
}
